home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part1 / 2917 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: soap.news.pipex.net!pipex!usenet
  2. From: m.hendry@dial.pipex.com (Mathew Hendry)
  3. Newsgroups: comp.sys.amiga.misc
  4. Subject: Re: .key
  5. Date: Thu, 25 Jan 96 02:51:35
  6. Organization: Private node.
  7. Distribution: world
  8. Message-ID: <19960125.41A780.2EFE@aj058.du.pipex.com>
  9. References: <1996Jan23.163238.27082@nosc.mil>
  10. NNTP-Posting-Host: aj058.du.pipex.com
  11. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  12.  
  13. Gary E. Dunn (gdunn@bluefish.nosc.mil) wrote:
  14. : I have a game that is started by executing a script
  15. : via iconx. What puzzles me is that the following
  16. : command line is executed before the game is started:
  17. : ..key dummy
  18. : This puzzles me because there are no files on the disk
  19. : named .key or dummy. Is anyone familiar with this
  20. : command?
  21.  
  22. .key is a shell script command which, when included at the beginning of
  23. a script, specifies the format of that script's command line arguments.
  24. For example, the standard AmigaOS script S:SPAT starts:
  25.  
  26. .key COM/A,PAT/A,OPT1,OPT2,OPT3,OPT4
  27. .bra {
  28. .ket }
  29.  
  30. COM and PAT are mandatory arguments, as indicated by the /A suffix. The
  31. script will fail if these two arguments are not added to the command line.
  32. OPT1 ... OPT4 are optional arguments, and so have no suffix.
  33.  
  34. .bra and .ket specify the characters used to delimit references to the
  35. arguments within the script, these characters being < and > by default. In SPAT
  36. these delimiters have been modified to { and }.
  37.  
  38. So, if you want to reference the COM argument within the script, write it
  39. as {COM}. For example, in SPAT again:
  40.  
  41. List >T:q{$$} {PAT} LFORMAT "{COM} *"%s%s*" {OPT1} {OPT2} {OPT3} {OPT4}"
  42.               ^^^^^          ^^^^^          ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^
  43.  
  44. where {$$} represents the current shell process number.
  45.  
  46. If you type "execute spat banana #?.c sort jumble fix break" within
  47. shell process 8, the above line will be run as:
  48.  
  49. List >T:q8 #?.c LFORMAT "banana *"%s%s*" sort jumble fix break"
  50.  
  51. -- Mat.
  52.